package com.cd.common.util;
/**
 * @Description 正则表达式工具类
 * @Author lqq
 * @Date 2021/2/6 10:22
 **/
public class RegexUtils {

    private static final String ALPHANUMERIC_REGEX = "^[A-Za-z0-9]+$";

    // 判断字符串是否为纯字母和数字
    public static boolean isAlphanumeric(String text) {
        if (text == null || text.isEmpty()) {
            return false;
        }
        return text.matches(ALPHANUMERIC_REGEX);
    }
}
